
/*
  Function:	 SetHandler
 			 Set the data handler.

  Parameters:
 			 Handler - Function that will be called when data is received.

  Handler:
  >			 Handler(Hwnd, Data, Port, DataSize)

			 Hwnd	- Handle of the window passing data.
			 Data	- Data that is received.
			 Port	- Data port.
			 DataSize - If DataSize is not empty, Data is pointer to the actuall data. Otherwise Data is textual message.
 */
IPC_SetHandler( Handler ){
	static WM_COPYDATA = 74

	if !IsFunc( Handler )
		return A_ThisFunc "> Invalid handler: " Handler

	OnMessage(WM_COPYDATA, "IPC_onCopyData")
	IPC_onCopyData(Handler, "")
}
